# from machine import Pin, ADC
# from time import sleep
#
# ## GPIO16 (D0)
# servo = ADC(0)
# lastnum = servo.read()
# print(lastnum)
# while True:
#     currnum = servo.read()
#     print(currnum)
#     sleep(0.5)
from machine import Pin, Signal

# Suppose you have an active-high LED on pin 0
led1_pin = Pin(0, Pin.OUT)
# ... and active-low LED on pin 1
led2_pin = Pin(1, Pin.OUT)

# Now to light up both of them using Pin class, you'll need to set
# them to different values
led1_pin.value(1)
led2_pin.value(0)

# Signal class allows to abstract away active-high/active-low
# difference
led1 = Signal(led1_pin, invert=False)
led2 = Signal(led2_pin, invert=True)

led1.value(1)
led2.value(1)

# Even better:
led1.on()
led2.on()